﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;

namespace QASampling.UI
{
    public partial class frmSplash : Form
    {
        private Thread th;

        public frmSplash()
        {
            InitializeComponent();
        }

        public void ShowForm()
        {
            th = new Thread(new ThreadStart(ShowFormNow));
            th.Start();
        }

        void ShowFormNow()
        {
            try
            {
                this.ShowDialog(this.Owner);
            }
            finally
            {
                this.Dispose();
            }
        }

        public void CloseForm()
        {
            if (th != null)
                th.Abort();
        }
    }
}
